package org.study.neo4j.boot.repository;

import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.neo4j.repository.query.Query;
import org.springframework.stereotype.Repository;
import org.study.neo4j.boot.model.Movie;

/**
 * 作用描述
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2025年04月14日
 */
@Repository
public interface MovieRepository extends Neo4jRepository<Movie, String> {
    /**
     * 删除Actor数据
     */
    @Query("MATCH (actor:`Actor`) DETACH DELETE actor")
    void deleteAllActor();

    /**
     * 删除所有数据：相当于清空数据库
     */
    @Query("MATCH (n) DETACH DELETE n")
    void deleteAllData();
}
